-
Notifications
You must be signed in to change notification settings - Fork 252
Add workflow to auto-update PrintVersion on release branch creation #1068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooo, interesting idea! We do still bump without branch creation, but this would at least catch some of them.
Thoughts @shahmishal?
--body "This PR updates the version in PrintVersion.swift to ${{ env.VERSION }}. | ||
Automatically created when release branch ${{ env.RELEASE_BRANCH }} was created." \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about the following:
This PR was automatically opened by a GitHub action on creation of a release branch (${{ env.RELEASE_BRANCH }}). Review the version update and merge if correct, otherwise update the version manually.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I’ve updated it. Thank you!
dd655d6
to
5d7e295
Compare
5d7e295
to
3e6a24d
Compare
Ah, so in cases like 6.1.2 and 6.1.3, they were released with just tags and no branch 🫨 |
Indeed 😅 I still think this is better than what we currently have - at least we can't miss major version bumps. The Windows failures are fixed by swiftlang/swift-markdown#245, but it hasn't been merged yet. |
Thanks @TTOzzi! |
on: | ||
create: | ||
branches: | ||
- "release/*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TTOzzi It seems that this is wrong.
It was triggered on a non-release branch.
- [undo-sha-pinning] Update version to undo-sha-pinning kkebo/swift-format#555
- https://github.com/kkebo/swift-format/actions/runs/18427728560
The following discussion looks related:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I hadn’t noticed that 😮 thank you for catching it! I’ll take a look right away.
This retries the work attempted in #975 and #1029.
When a release branch is created, this workflow automatically updates the version output value in PrintVersion.swift to match the release version, commits the change, and opens a PR.
If committing directly to the release branch is acceptable, that would be cleaner. Please let me know your thoughts, and I’ll adjust the workflow accordingly.